<template>
  <div class="divClass">
    <div>这是监控预警</div>
    <button @click="getClick">click</button>
    <div>
      <span>{{ message }}</span>
    </div>
    <button @click="send2Parent">send2Parent</button>
  </div>
</template>

<style lang="css" scoped>
.divClass {
  border-style: dashed;
  border-color: blueviolet;
}
</style>

<script setup lang="ts">
import { ref } from 'vue'
import { getH7900002 } from '@/api/fundweb'
import routerParent from '@/utils/router/routerParent/index'

const message = ref('')

const getClick = async () => {
  const params = {
    type: '热点跟踪',
    subType: '每日一图',
  }
  await getH7900002(params).then((res) => {
    console.log(res)
    if (res && res.result) {
      message.value = res.result
      console.log(res.resultgit)
    }
  })
}

const send2Parent = async () => {
  routerParent('/goodGroups')
}
</script>
